package com.shujia.stream;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStream;
import java.io.InputStreamReader;

public class RandomMakeData {
    public static void main(String[] args) throws Exception {

        /**
         * 生成数据，每200毫秒打印一条
         *
         */

        //读取resources  目录下的文件
        InputStream input = RandomMakeData.class.getClassLoader().getResourceAsStream("dianxin");

        InputStreamReader inputStreamReader = new InputStreamReader(input);

        BufferedReader reader = new BufferedReader(inputStreamReader);

        String line;
        while ((line = reader.readLine()) != null) {

            //每200毫秒打印一次

            System.out.println(line);

            Thread.sleep(200);


        }


    }
}
